package com.atguigu.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * Author:   wj
 * Date:     2020/5/21 15:14
 * Description:
 */
@Configuration
public class ApplicationContextConfig {
    @Bean
    @LoadBalanced //负载均衡  （用了自定义的负载均衡就不需要了）
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }

}
